<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .wrap {
            width: 400px;
            height: 400px;
        }
        .child {
            /* width: auto; */
            /* box-sizing: border-box; */
            padding: 5px;
            height: 40px;
            margin: 10px;
        }
    </style>
</head>
<body>
    <div class="wrap">
        <div class="child"></div>
    </div>
</body>
</html>